<!DOCTYPE html>
<html>
<head>	
	<title>{:C('SERVER_HOME_NAME')}</title>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css" />		
	

</head>
<style type="text/css">
	.news{
		position: absolute;
			left: 50%;
			top: 35%;
			background: #fff;
			transform: translateX(-50%) translateY(-50%);
			border-radius:5px;
			overflow: hidden;
			border: 1px solid #ccc;
			padding: 40px;
			display: none;
	}
	.look-shut{
			position: absolute;
			right: 10px;
			top: 10px;
			cursor: pointer;
		}
	.news li{
		margin: 10px;
	}
	.news li span{
		margin-left: 30px;
	}	
	.news li span:first-child{
		width: 150px;
		display: inline-block;
	}
</style>
<body>
	<div class="box">
		<include file="Public/top" />
		<div class="content">
			<include file="newsLeft" />
			<div class="main p10">
				<div class="editer ad">
					<h3>新闻查看</h3>
					<table class="">
						<tbody>
						<volist name="comList" id="vo">
							<tr>
								<td width="40%">
									<p class="title">{$vo.news_title}</p>
									<p class="tl">发布时间 ：{$vo.add_time}</p>
								</td>
								<td width="30%" class="tl"><if condition="$vo.is_ok eq '1' ">已完成<elseif condition="$vo.is_ok eq '0' and $vo.is_apply eq '1' " />已审核未完成<elseif condition="$vo.is_apply eq '2' "/>未通过<else/>未审核</if></td>
								<td width="30%"><a href="javascript:;" data-id="{$vo.id}" class="border-right">投稿</a>
								
								<a href="__URL__/orderDetail/id/{$vo.id}">查看</a></td>
							</tr>
						</volist>	
						</tbody>		
					</table>
					<div class="page">{$page}</div>
				</div>	
			</div>	
		</div>
	</div>
	<div class="news">
	<div class="look-shut"><img src="__PUBLIC__/admin/images/close.png"></div>
		<ul id="newsList">

		</ul>


	</div>


	<include file="Public/ok" />
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.min.js"></script>
	<script src="__PUBLIC__/js/page.js"></script>
	<script type="text/javascript">
		$(".border-right").on("click",function(){
			var id=$(this).attr("data-id");
			$.post('ajaxGetNews', {id:id}, function(data) {
				var str="";
				if(data){
					
					for (var i = 0; i < data.length; i++){

	            	 		str+="<li><span>"+data[i]['news_name']+"</span><span><a href='"+data[i]['news_url']+"' target='_blank'>"+data[i]['news_url']+"</a></span></li>"

	            	 	}
	            	 	str =$(str);
	            	 	
				}else{
					str="<li>暂未完成投稿</li>"
				}

			$("#newsList").html(str);
			},"json");
			$(".news").fadeIn();
		});

		$(".look-shut").on("click",function () {
			$(".news").hide();
		})
	</script>	
</body>
</html>